\chapter{Local Employment Impacts of Competing Energy Sources: the Case of Shale Gas Production and Wind Generation in Texas}

\begin{chapabstract}
  In this study, we develop a general econometric model to compare job
  creation in wind power versus that in the shale gas sector. The
  model is ``general'' in the sense that different restrictions to
  parameters of the model yield a range of special cases, such as
  finite distributed lag, autoregressive distributed lag, and spatial
  panel approaches. We also compare the results using the different
  special models and discuss some of their advantages and
  drawbacks. The model is estimated using county level data in Texas
  from 2001 to 2011. Despite different estimation methodologies, the
  results show that shale development and well drilling activity have
  brought strong employment and wage growth to Texas, while the impact
  of wind industry development on employment and wages statewide is
  either not statistically significant or quite small.
\end{chapabstract}

\section {Introduction} 
\label{sec:introduction}

Nowadays, there is a lot of discussion in the media about job creation
in the renewable energy industry. At the same time, commentators have
talked up about the potential for renewable energy to provide greater
energy independence and security, have notable environmental benefits
due to reduced CO$_2$ emissions, and act as a driver for significant
economic growth by fostering continual innovation.

Since energy produced through renewable sources is still more
expensive that that produced through fossil fuels, state and local
governments are spending tens of millions of dollars is subsidies to
fund the renewable industry. More than half of all states have put in
place Renewable Portfolio Standards\footnote{ Renewable portfolio
  standards (RPS), also referred to as renewable electricity standards
  (RES), are policies designed to increase generation of electricity
  from renewable resources. These policies require or encourage
  electricity producers within a given jurisdiction to supply a
  certain minimum share of their electricity from designated renewable
  resources.} to promote generation from renewable sources. Federal
production tax credits and grants also contributed to increases in
renewable capacity and generation between 2001 and 2011.

The renewable energy sector has developed quickly in the past 12
years.  In particular, as seen in Figure \ref{fig:renewElec}, wind was
the fastest growing source of non-hydroelectric renewable resource
generation, as many operators of wind turbines have benefited from tax
credit programs. Other sources of non-hydroelectric renewable
electricity generation have included biomass, geothermal, and wood,
but these have remained relatively stable since 2000.% In
% 2011, in the United States, biomass produced about 11\% of total
% renewable electricity generation, wind produced 23\%, solar
% (photovoltaics and concentrating solar power) produced 1\%, and
% geothermal produced 3\%.
\begin{figure}[h]
  \centering \includegraphics[width=0.6\textwidth]{ch3/renewElec.jpg}
  \caption[Non hydro-power renewable energy generation, 1990-2011]{Non
    hydro-power renewable energy generation, 1990-2011 \it{Data
      source: EIA}}
  \label{fig:renewElec}
\end{figure}

In principle, renewable energy has the potential to create many
jobs. Furthermore, many of these jobs are guaranteed to stay
domestics, as they involve construction and installation of physical
plant and facilities. Additionally, domestic wind turbine and
component manufacturing capacity has increased. Eight of the ten wind
turbine manufacturers with the largest share of the U.S.  market in
2011 had one or more manufacturing facilities in the United States at
the end of 2011. By contrast, in 2004 there was only one active
utility-scale wind turbine manufacturer assembling nacelles in the
United States (GE)\footnote{ 2011 Wind Technology Market Report by
  U.S. Department of Energy}. In addition, a number of new wind
turbine and component manufacturing facilities were either announced
or opened in 2011, by both foreign and domestic firms. The American
Wind Energy Association (AWEA) estimates that the entire wind energy
sector directly and indirectly employed 75,000 full-time workers in
the United States at the end of 2011.

At the same time, the recent identification of the vast extent of
shale gas and oil reserves and the development of cost-effective
horizontal drilling and hydraulic fracturing techniques has caused
U.S. production of shale oil and gas to boom. The Energy Information
Administration's 2012 Annual Energy Outlook \citep{EIA2012} projects
that the share of shale gas as a part of total U.S. natural gas
production will increase from 4 percent in 2005 to 34 percent by 2015
and 49 percent by 2025. As shown in Figure \ref{fig:NGProd}, shale gas
is the largest contributor to natural gas production growth; there is
relatively little change in production levels from tight formations,
coalbed methane deposits, and offshore fields.
\begin{figure}[h]
  \centering \includegraphics[width=0.6\textwidth]{ch3/NGprod.jpg}
  \caption[Natural gas production by source, 1990-2035]{Natural gas
    production by source, 1990-2035 (TCF). \it{Data source: EIA}}
  \label{fig:NGProd}
\end{figure}

The development of shale gas resources has created an investment boom
in the oil and gas industry and led to economic revitalization in
places like North Dakota, Alberta, West Pennsylvania, Texas, and
Louisiana to name a few. During 2007-2011, employment in the oil and
gas extraction sector grew at an annual rate of 7.49 percent and 33.5
percent in total. By comparison, during the same period, total
employment declined 3.3 percent below the starting value (Figure
\ref{fig:ogejobs}). Meanwhile, states rich in shale gas have
experienced a large increase in employment while the nationwide
employment growth rate remains negative (Figure \ref{fig:statejobs}).
Furthermore, the substantially expanded U.S. natural gas supply at
stable, relative low prices is stimulating downstream investment in
natural gas using equipment by numerous manufacturing
sectors\footnote{ Especially manufacturing sectors that are sensitive
  to energy costs, such as basic chemicals, plastics \& rubber,
  pharmaceuticals, aluminum, pesticides, paints, and fertilizers.}, as
well as electricity generators (Figure \ref{fig:TotalElec}), and the
transportation sector. This activity is creating jobs and increasing
wage income.
\begin{figure}[h]
  \centering
  \subfloat[]{\label{fig:ogejobs}\includegraphics[width=0.48\textwidth]{ch3/ogejobs.jpg}}
  \subfloat[]{\label{fig:statejobs}\includegraphics[width=0.46\textwidth]{ch3/statejobs.jpg}}
\caption{Oil and gas extraction employment, 2007-2011}
\label{fig:shalejobs}
\end{figure}

\begin{figure}[h]
  \centering \includegraphics[width=0.9\textwidth]{ch3/summercap.pdf}
  \caption[Electricity net summer capacity by source]{Electricity net
    summer capacity by source (all sectors), 1949-2011, \it{Data
      source: EIA}}
  \label{fig:TotalElec}
\end{figure}

Both the wind power sector and shale gas sector have been developing
quickly and receiving significant attention in the media. Since wind
and natural gas are competing sources of electricity generation, in
order to guide policy, it would be useful to have an idea of how many
jobs are created by these two competing resources. While the aggregate
net effect on employment from exploiting different sources of energy
production is clearly an important question, it cannot be readily
answered in the context of traditional macroeconomic models. The
reason is that, as these models assume market clearing, they cannot
easily account for variations in unemployment rates and thus are not
well suited to study the consequences of alternative government
policies for aggregate employment levels. Regardless of how one models
the operation of labor markets, however, the impact of any change can
be gauged by examining the labor intensity of the different
activities.

Generally speaking, two types of studies focus on the employment
impacts in the energy industry. One is an input-output (I/O) model,
the other is based on survey responses from employers, and uses simple
descriptive and analytical techniques\footnote{ See Section
  \ref{sec:literature-review} for detailed discussion.}. In this
study, we collected data on the historical job creation per unit of
energy services produced for each energy source and used this data and
a simple econometric model to estimate the historical job-creating
performance of wind versus that of shale gas. It is a bottom-up
approach, like the approach based on surveys.  However, the
econometric techniques used allow us to compare the employment impacts
of these two different sectors in a more systematic and consistent
way.

The next section is the literature review, and section \ref{sec:data}
is the data description. The general econometric model is introduced
in section \ref{sec:model-specification}, while estimation methods and
results are reported in section \ref{sec:estimation-methods}. Section
\ref{sec:conclusions} is the conclusion.
 
\section{Literature Review}
\label{sec:literature-review}
There has been a large increase in reports on shale jobs and wind jobs
in the past several years. Most previous analyses have been completed
by non-government organizations, consulting firms, or universities but
there have been few peer-reviewed journal publications.

Generally speaking, there are two types of studies that focus on the
employment impacts in the energy industry. One is an input-output(I/O)
model, which is intended to model the entire economy as an interaction
of goods and services between various industrial sectors and
consumers. The other is based on survey responses from employers, and
uses simple descriptive and analytical techniques.

For oil \& gas industry, most reports are I/O model studies. Two
widely-used I/O models are the IMPLAN model (See \citet{IHS2012},
\citet{UTSA2012}, \citet{PennState2009}, and \citet{ACC2011}) and the
RIMS II model by U.S. Bureau of Economic Analysis (BEA) (See
\citet{HaynesShale2009}). \footnote{The IMPLAN model uses a national
  input-output dollar flow table called the Social Accounting Matrix
  (SAM) to model the way a dollar injected into one sector is spent
  and re-spent in other sectors of the economy, and measure its
  economic multiplier effects. The RIMS II provides solely I/O
  multipliers that measure output, employment, and earnings effects of
  any changes in a region’s industrial activity.}  All the studies we
have investigated suggest shale oil and gas boom has a large impact on
jobs, income and economic growth.

A study on Eagle Ford Shale \citep{UTSA2012} estimates the total
economic output impact of shale activity on local 14-county region in
2011 was just under \$20 billion dollars and supported 38,000
full-time jobs. If the studied region was extended to 20-county
region, 47,097 full-time jobs were supported instead.

A nationwide shale industry report\citep{IHS2012} has found that in
2010, the shale gas industry supported 600,000 jobs, and this will
grow to nearly 870,000 in 2015 and to over 1.6 million by 2035.

Two reports on Marcellus shale by Pennsylvania State
University \citep{PennState2009} and West Virginia
University \citep{WVU2009} show that the oil and gas industry in
Pennsylvania generates \$3.8 billion in value added, and over 48,000
jobs in 2009; while in west Virginia, the economic impact of the oil
and natural gas industry in 2009 is \$3.1 billion in total value added
and approximately 24,400 jobs created.

The Jobs and Economic Development Impact(JEDI) model developed by the
National Renewable Energy Laboratory(NREL) is a series of
spreadsheet-based I/O models that estimate the economic impacts of
constructing and operating power plants, fuel production facilities,
and other projects at the local (usually state) level.\footnote{JEDI
  Models are available at \url{http://www.nrel.gov/analysis/jedi/}.}
\citet{TCU2009} employs the JEDI Wind Energy Model to examine economic
impacts of the large-scale wind farm construction and tested the model
validation using data from NextEra's Capricorn Ridge and Horse Hollow
facilities. They find that the JEDI model overestimates local share of
jobs in construction phase in smaller, rural county, and
underestimates number of jobs (more than 50\%) in large, urban
county. Obviously, JEDI model sets same local share value to all
counties and does not consider urban effects as well. Plus, JEDI model
assumes 100\% local share for operations and maintenance (O\&M) jobs,
which may be implausible especially in small rural counties.

I/O models provide the most complete picture of the economy as a
whole. They capture employment multiplier effects, as well as the
macroeconomic impacts of shifts between sectors. Hence they could
account for losses in one sector (e.g. conventional oil industry)
created by the growth of another sector (e.g. the wind energy
industry). However, collecting data for an I/O model is highly labor
intensive, and the calibration process of default multiplier
parameters may be biased due to lack of information and subjectivity.

On the other hand, bottom up estimates are based on industry/ utility
surveys, the outlook of project developers and equipment
manufacturers, and primary employment data from companies across
manufacturing, construction, installation, and O\&M. For wind energy,
most reports are analytical-based studies, and only calculate direct
employment impacts.

A case study\footnote{Slides is available at
  \href{https://texaswindclearinghouse.us/uploads/STx_--_Tues_--_5-Ted_Hofbauer-Pattern_Energy-_South_Texas_Project_Case_Studies.pdf}{Gulf
    Wind: Harnessing the Wind for South Texas}} on economic effects of
Gulf wind project in Texas reports that they would create 250 - 300
jobs during peak construction period (9 months), and 15 - 20 permanent
jobs.

A report on wind industry from Natural Resources Defense Council
(NRDC) measures number of direct jobs that a typical wind farm may
create across the entire value chain. They analyzed each of the 14 key
value chain activities independently to determine the number of
workers involved at each step in the wind farm building. And they
found that just one typical wind farm of 250MW would create 1079 jobs
over the lifetime of the project.

Similarly, the Renewable Energy Policy Project (REPP) has developed a
spreadsheet-based format of the calculator\footnote{More information
  is available at \url{http://www.repp.org/labor/}} using data based
on a survey of current industry practices. It is used to calculate the
number of direct jobs from wind, solar photovoltaic, biomass and
geothermal sectors as a result of enactment of an RPS. According to
the calculator, every 100 MW of wind power installed provides 475 jobs
in total (313 manufacturing jobs, 67 installation jobs, and 95 jobs in
O\&M).


\section{Data}
\label{sec:data}
In this paper, we use data from Texas, because it contains rich shale
gas and oil resources while also being the national leader in wind
installations and a manufacturing hub for the wind energy
industry. According to EIA, Texas accounted for 40 percent of
U.S. marketed dry shale gas production in 2011, making it the leading
unconventional gas producer among the states. Meanwhile, Texas leads
the nation in wind-powered generation capacity and is the first state
to reach 10,000 megawatts of wind capacity.
% In the sessions below, I discussed variables that should be included in the empirical analysis, stated their data sources and described some summary statistics. 
\subsection{Data Description}
\label{sec:data-description}

In Texas, there are 254 counties\footnote{ 77 of 254 are urban
  counties.}. For each county $i = 1,...,254$, We have observations in
$T = 132$ months of $11$ years ($2001$ - $2011$), making the panel
balanced.

I took total employment in all industries as a dependent variable. I
did not use data of specific energy industries because, besides direct
job creation, I want to consider the total employment effects,
including indirect jobs, such as jobs created in upstream and
infrastructure supplying industries, and induced jobs, such as jobs
added in sectors supplying consumer items (food, auto, and housing,
etc.) and services. Another candidate dependent variable is the
average weekly wage, since it may also be impacted by an increase in
the demand for workers.  We use monthly employment data and quarterly
wage data from Quarterly Census of Employment and Wages (QCEW)
Database of Bureau of Labor Statistics(BLS).\footnote{ QCEW employment
  and wage data are derived from microdata summaries of 9.1 million
  employer reports of employment and wages submitted by states to the
  BLS in 2011. These reports are based on place of employment rather
  than place of residence. Average weekly wage values are calculated
  by dividing quarterly total wages by the average of the three
  monthly employment levels (all employees, as described above) and
  dividing the result by 13, for the 13 weeks in the quarter. The
  employment and wage data could be downloaded at
  \url{http://data.bls.gov/cgi-bin/dsrv?en}} The latter has been
adjusted to a real wage using the implicit price deflator (IPD) of GDP
from BEA. \footnote{ An implicit price deflator of GDP is the ratio of
  the current-dollar value of GDP, to its corresponding chained-dollar
  value, multiplied by 100.}

In order to evaluate the impact of shale and wind industry development
on employment and the local economy, we need to devise a method for
measuring the activity of the shale and wind industries. The key
explanatory variables we use are the number of unconventional wells
completed and the new installed wind capacity in each county each
month.

Other variables could be used to reflect other aspects of shale
activity. These include the number of permits, rig counts, the number
of wells spudded, and shale gas production. We choose the number of
wells completed because the completion date indicates the end of the
construction period of each well. During the construction period, more
direct and on-site jobs are created; after the construction, on-site
jobs decrease while indirect and induced effects would last. To fully
describe the impact of shale on employment, especially the multiplier
effects of job creation in the local economy, we allow well drilling
activities to affect employment with a lag and study both
pre-completion and post-construction effects.

\begin{figure}[h]
  \centering \includegraphics[width=0.9\textwidth]{ch3/wells.pdf}
  \caption{Number of completed new wells, Jan, 2001 - Dec, 2011}
  \label{wells}
\end{figure}

In the shale industry, the entire process from spudding to producing
marketed output can take up to 3-4 months, among which horizontal
drilling currently takes approximately 18-25 days from start to
finish. Then wells are fractured to release the gas before the well is
completed. It is then connected to a pipeline, which transports the
gas to the market. Among all these steps, hydraulic fracturing is most
labor intensive and the last step before the completion. Hence we
expect drilling activities to have a peak impact on employment in the
pre-completion period in the month of well completion.

The well information is taken from the Drilling Info
Database\footnote{ Data is available at
  \url{http://info.drillinginfo.com/}}. We choose wells that are both
directional/horizontal drilled and hydraulically fractured\footnote{
  This filter option is only available for Texas data}, so that we
exclude conventional oil/gas wells from our data set. There were 31050
directional/horizontal and fractured wells completed in 174 counties
of Texas during 2001 - 2011, including 25467 gas wells, 4963 oil
wells, and 620 other types of wells. From Figure \ref{wells}, we can
see that shale gas developed very quickly in the past 12 years, from 1
well per month in Jan, 2001 to around 500 in 2011. The completion date
and location of each well are used to count the number of wells
completed in each county each
month. % Then we add it up to get cumulative number of wells, assuming 0 at the starting point Jan, 2001.


To measure wind activity in each county we used installed nameplate
capacity online per month. Power generation data is not used because
more jobs are created during the construction period than in the O\&M
period. The installed capacity and online year of all wind projects in
Texas through 2007-2011 can be found at American Wind Energy
Association (AWEA). For the wind projects before 2007, I used EIA
electricity data on plant level output\footnote{Data is available at
  \href{http://www.eia.gov/electricity/data/browser/\#/topic/1?agg=2,0,1\&fuel=0ho\&geo=g\&sec=g\&freq=M\&datecode=201212\&pin=\&rse=0\&maptype=0\&ltype=pin\&ctype=linechart\&end=201210\&start=200101}{
    EIA website}.}  and a wind industry progress report by Wind
Today. To find the online month and county location of each wind
project, I referred to some additional sources, such as project
information from projects' websites and local news of its online
year. For those wind farms that cover several neighboring counties, I
divided installed capacity of farms equally between each of the
counties. Until 2011, 125 wind projects had been constructed in 40
counties, with total installed capacity of 10006MW, compared to 6
counties and 920MW in 2001.

\begin{figure}[h]
  \centering \includegraphics[width=0.9\textwidth]{ch3/windcap.pdf}
  \caption{New wind capacity installed during Jan, 2001 - Dec, 2011}
  \label{wells}
\end{figure}

\subsection{Data Stationarity}
\label{sec:data-stationarity}
Since regression test statistics do not have the usual asymptotic
distributions when variables are non-stationary, we want to look at
the stationarity of the variables before we use them in any regression
analyses. To test for non-stationarity in a panel data setting, we
consider the following model written in difference form:
\begin{align}
  \label{eq:ADF}
  \Delta y_{it} = \rho y_{i,t-1} + \sum^{p_i}_{L=1}\delta_i\Delta
  y_{i,t-L} + \alpha_0 + \alpha_1t + u_{it},\; t = 1,2, ...
\end{align}
and test $\rho = 0$. Note that the term $\alpha_0 +\alpha_1t$ allows
for a constant and a deterministic time trend.  When $\rho = 1$, the
series $y_{it}$ has unit root and is a random walk. The random walk
process is simply a sum of all past random shocks, which means that
the effect of any one shock lasts forever. When $\rho < 1$, $y_t$ is
stationary\footnote{ Specifically, $y_t$ is covariance stationary,
  which means the correlation between $y_t$ and $y_{t+h}$ only depends
  on $h$.} and as the variables get farther apart in time, the
correlation between them becomes smaller and smaller.

The Im, Pesaran and Shin (IPS) test \citep{Im2003} we used to test for
$\rho = 0$ is based on the estimation of above augmented
Dickey-Fuller(ADF) regressions for each time series. A statistic is
then computed using the t-statistic associated with the lagged
variable. Note that this procedure does not require $\rho$ to be the
same for all the counties. The null hypothesis is that all the series
have unit root, and the alternative is that some may have a unit root
while others have different values of $\rho_i<0$.

To run the test, one has to determine the optimal number of lags $p_i$
for each time series in the panel. With too few lags, $u_{it}$ will be
serially correlated and the test statistics will not have the assumed
distribution. With too many lags the power of the test statistic goes
down. Since we have monthly data, I set maximum $p_i$ at $14$, which
is slightly larger than 12 month annual cycle. Then I used both the
Swartz information criteria (SIC) and Akaike information criteria
(AIC) to determine optimal $p_i$.


We then used another test based on \citet{Hadri2000} as a
complement. The Hadri statistic does not rely on the ADF
regression. It is the cross-sectional average of the individual KPSS
statistics \citep{Kwiatkowski1992}, standardized by their asymptotic
mean and standard deviation. It tests the opposite null hypothesis
that all panels are stationary, while the alternative is that some
panels contain unit roots.

For both the employment and the wage series, the p-value of the IPS
test is close to zero. Hence $H_0$ is rejected and we conclude that
some counties may have no unit roots. On the other hand, the Hadri
test rejects $H_0$ as well, implying that at least one county has a
unit root. Hence, we may conclude from the two tests that the
employment and wage series of some counties have unit roots while
others are stationary.

Given these inconclusive results, I then applied the Dickey-Fuller
Generalized Least Squares (DF-GLS) test (at 5\% level) and the KPSS
test (at 10\% level) to each county.  In 156 counties, the DF-GLS test
cannot reject a unit root and the KPSS test shows unit
root.% \footnote{ Among these 156 counties, 46 are urban counties. That is, employment of 60\% urban counties and 62\% rural counties may have unit roots. The type of county doesn't make much difference.} On the other hand, based on results of both tests, only 34 counties have stationary employment series .

\section{Econometric Model}
\label{sec:model-specification}


We estimated the original regression relationship treating the data
via a panel data approach given data set of 254 counties in Texas
covering the years 2001-2011. Panel data has several advantages
relative to either time series or cross section data. For one, it
allows us to look at dynamic relationships which we cannot do with a
single cross section. A panel data set also allows us to test for
effects in counties with shale and wind activities and those without,
which cannot be done with a time series alone. A major problem with
straight time series analyses is that many exogenous factors change at
the same time making it difficult to assign an outcome to any one
particular change. The panel enables us to interpret differences
between counties over time as policies vary in both dimensions.

We did a panel data approach given a data set of 254 counties in Texas
during 2001-2011. Comparing to time series and cross section data,
having data over time for the same counties is useful for several
reasons. For one, it allows us to look at dynamic relationships which
we cannot do with a single cross section. A panel data set also allows
us to control for unobserved cross section heterogeneity.

\subsection{Assumptions}
\label{sec:assumptions}
We start with a static linear unobserved effects model：
\begin{align}
  \label{eq:basic}
  y_{it} &= \mathbf{x}_{it}\mathbf{\beta} + \theta_t + c_i + u_{it}, t = 1,2,...,T, 
\end{align}
where $y_{it}$ is a scalar, $\mathbf{x}_{it}$ is a $1\times K$ vector
for $t = 1,2,...,T$, and $\mathbf{\beta}$ is a $K\times 1$
vector. $c_i$ is a time-invariant unobservable effect, and $\theta_t$ represents  a series of time fixed effects.

\subsubsection{Dependence of unobservable effects}
\label{sec:Dependence-of-ci}
To make the model more realistic, we allow for arbitrary
dependence between the unobserved effects $c_i$ and the observed
explanatory variables $\mathbf{x_{it}}$. For example, underground
geology characteristics would be included in $c_i$ and these would
undoubtedly be correlated with the number of wells drilled in county
$i$. Also, wind capacity highly depends on the climate and especially
the wind resource of the county, which is part of $c_i$ as well.

\subsubsection{Strict Exogeneity}
\label{sec:strict-exogeneity}
Another assumption I would like to make is that the explanatory
variables are strictly exogenous conditional on the unobserved effect
$c_i$. This terminology, introduced by \citet{Chamberlain1982},
requires that
\begin{align}
  \label{eq:StrictE}
    E(u_{it}|\mathbf{x}_i,c_i) = 0, t = 1,2,...,T. 
\end{align}

That is to say, once $\mathbf{x_{it}}$ and $c_i$ are controlled for,
$\mathbf{x_{is}}$ has no partial effect on $y_{it}$ for $s\neq t$ and
$u_{it}$ has zero mean conditional on all explanatory variables in all
time periods.

Contemporaneous exogeneity is a much weaker assumption:
$E(u_{it}|\mathbf{x_{it}},c_i) = 0$. Note that it says nothing about
the relationship between $\mathbf{x_s}$ and $u_t$ for $s\neq
t$. Sequential exogeneity, which requires
$E(u_{it}|\mathbf{x_{it},x_{i,t-1},...,x_{i1}},c_i) = 0$, for $t =
1,2,\ldots,T$, is stronger than contemporaneous exogeneity.  It
implies that $\mathbf{x_s}$ is uncorrelated with $u_t$ for all $s\leq
t$, but puts no constraints on correlation between $\mathbf{x_s}$ and
$u_t$ for $s > t$.

Typically, we feel comfortable with assuming zero contemporaneous
correlation, that is, $u_{it}$ is uncorrelated with the number of
wells drilled or the wind capacity installed at $t$, but what about
correlation between $u_{it}$ and, say, $\mathbf{x_{i,t+1}}$?  Does
future well drilling activity or wind farm construction depend on
shocks to the county employment in the past? We don't think such
feedback is very important in our case, since total employment of the
county is certainly not the main goal of energy companies. So it seems
reasonable to assume that past employment has few, if any, effect on
energy companies' future decision making processes.

Another issue is that the explanatory variables could have lasting
effects, so that correlation exists between $u_{it}$ and past
$\mathbf{x_{i,t-1}}, ... \mathbf{x_{i,1}}$ and sequential exogeneity
fails. It is likely to be the case here since we expect well drilling
activity and wind activity to have lasting effects on local
employment. One way to soak up correlation is to include lags of
explanatory variables into the model. Strict exogeneity would still
hold if enough lags are included. The other way is to use instrumental
variables (IV). However, the IV method is usually not recommended because it is often difficult to find suitable instruments.

A test of strict exogeneity is based on
\citet{Wooldridge2002}, 10.7.1. In the equation
\begin{align}
  \label{eq:exogeitytest}
  \Delta y_{it} = \mathbf{\Delta x_{it}\beta}+\mathbf{w_{it}\gamma} +
  \Delta u_{it}, t =2,...,T,
\end{align}
$w_{i,t}$ is a subset of $x_{i,t}$. Under strict exogeneity,
none of $\mathbf{x_{it}}$ should be significant as additional
explanatory variables in the first difference (FD) equation, that is, we should find $H_0$: $\gamma = 0$. Carrying out this test, the $F$ statistic on $\gamma$ is
$0.32$ with $p-value = 0.5695$, and we could not reject $H_0$, strict
exogeneity holds.

Note that the strict exogeneity assumption never holds in unobserved
effects models with lagged dependent variables. The reason is  that  $y_{it}$ is
correlated with $u_{it}$ and would show up as part of explanatory
variables at $t+1$ so $E(u_{it}|\mathbf{x_{i,t+1}})\neq
0$. Additional care is required when we include lagged dependent
variables as explanatory variables on the right hand side.

\subsubsection{Serial Correlation}
\label{sec:serial-correlation}
Note that we haven't made any assumption to rule out serial
correlation in the idiosyncratic error $u_{it}$, that is
$Corr(u_{it},u_{is})\neq 0$, $t\neq s$. Specifically, here we only
consider serial correlation across time, assuming cross-sectional
correlation is excluded a priori. If one allows for the $u_{it}$ to be
arbitrarily serially correlated over time, the usual pooled ordinary
least squares (OLS) and fixed effects (FE) standard errors are not
valid, even asymptotically. A robust standard error should be used to
calculate test statistics or a more general kind of feasible general
least squares (FGLS) method is needed.  To test existence of serial
correlation in $u_{it}$, we use the Breusch-Godfrey/Wooldridge's LM
test and the Wooldridge first difference test \citep{Wooldridge2002}
for serial correlation in panel models.

Rather than see serial correlation as a technical violation of an OLS
assumption, the modern view is to think of time series data in the
context of economic dynamics. Instead of mechanistically fixing serial
correlation with a robust covariance matrix and FGLS method, we could
also try to develop theories and use specifications that capture the
dynamic processes in question.  From this perspective, we view serial
correlation as a potential sign of improper theoretical specification
rather than a technical violation of an OLS assumption. This view of
serial correlation leads us to look at dynamic regression models where
`` dynamic'' refers to the inclusion of lagged variables.

There are two types of dynamic models: (i) distributed lag models and
(ii) autoregressive models. Distributed lag models include lagged
values of the independent variables, whereas autoregressive models
include lagged values of the dependent variable.

\subsection{Finite Distributed Lag Model}
\label{sec:finite-distr-lag}
Since we expect drilling and wind activity could have lasting effects
on local employment, we should include lags of explanatory variables
into the model. A finite distributed lag (FDL) model might be
appropriate if the impact of the explanatory variables lasts over a
finite number of periods $q$ and then stops. The FDL unobserved
effects model expands equation \eqref{eq:basic} to the form:
\begin{align}
  \label{eq:FDL}
  {E}_{it} &= \sum_{k=0}^q\beta_k{wells}_{i,t-k} +
  \sum_{k=0}^q\delta_k{wcap}_{i,t-k} + c_i + \theta_t + u_{it}
\end{align}
where $E_{it}$ denotes total employment, $wells_{it}$
denotes number of directional/fractured wells drilled, and
$wcap_{it}$ is installed wind capacity for $i = 1,2,\ldots,254$
and $t = 1,2,\ldots,T$. Our interest lies in pattern of coefficients $\{\beta_k, \delta_k\}_{k =
0}^{q}$. $\beta_0$ and $\delta_0$ are the immediate change in $E_i$ due to the one-unit increase in $wells_i$ and $wcap_i$ respectively at time $t$. Similarly, $\beta_k$ and $\delta_k$ are the changes in $E_i$ $k$ periods after the temporary change. At time $t+q$, $E_i$ has reverted back to its initial level: $E_{i,t+q}$ = $E_{i,t-1}$.

We are also interested in the change in $E_i$ due to a permanent increase in any of the explanatory variables. For example, following a permanent increase in $wells_{it}$, after one period, $E_{i,t+1}$ has increased by $\beta_0+\beta_1$, and after $k$ periods, $E_{i,t+k}$ has increased by $\beta_0+\ldots+\beta_k$. There are no further changes in $E_i$ after $q$ periods. This shows the sum of the coefficients on current and lagged $wells_i$ is the long-run change in $E_i$, which is also referred to as the long-run propensity (LRP). For the impact of variable $wcap_i$ on $E_i$, the same story applies.

However, it is rarely the case that we actually know the right lag
length or have a strong enough theory to inform us about it. Some
other problems may also arise with an FDL model. For example, time
series are often short and so the inclusion of the lagged variables
may eat up a lot of degrees of freedom. In addition, the fact that the
explanatory variables are likely to be highly correlated is likely to
lead to severe multicollinearity.

\subsection{Autoregressive Distributed Lag Model}
\label{sec:autore-distr-lag}

We can solve the multicollinearity problem mentioned above by
including a lagged dependent variable with fewer lags of explanatory
variables, and the model changes to the autoregressive distributed lag
(ADL) model. In many ways, the ADL model is similar to the FDL model,
except it is now easy to see that the impact of explanatory variables
persists over time but at a geometrically declining rate. Denoting the
number of lagged dependent variables as $p$, an ADL$(p,q)$ model with
unobserved effects has the form:
\begin{align}
  \label{eq:ADL} {E}_{it} &=\sum_{j=1}^p\lambda_j E_{i,t-j} +
\sum_{k=0}^q\beta_k{wells}_{i,t-k} +
\sum_{k=0}^q\delta_k{wcap}_{i,t-k} + c_i + \theta_t + u_{it}
\end{align} 
where $\{\lambda_j\}_{j=1}^{p}$ are autoregressive coefficients. If
there is a temporary change in $wells$, $E_{it}$ will initially go up
by $\beta_0$ in period 1, then by $\beta_1+\lambda_1\beta_0$ in period
2, and then by $\beta_2+\lambda_1(\beta_1+\lambda_1\beta_0) +
\lambda_2\beta_0$ in period 3 etc. In other words, the effect of
having a lagged dependent variable is to make the effect from the
previous period persist. Eventually, the effect of the impulse will
disappear and we will return to our original equilibrium as long as
the process is stationary. If we have a unit level change, the ADL
model reaches a new equilibrium that is
\begin{align}
\label{eq:LRP_pq}
 \frac{\sum_{k=0}^{q}\beta_k}{1-\sum^p_{j=0}\lambda_j} 
\end{align}
higher than the original equilibrium.

Another advantage of the ADL model is that the inclusion of a lagged
dependent variable will often eliminate the serial correlation,
particualrly if additional lags of the dependent variable are
included.  Lags of the independent variables may also assist with
eliminating serial correlation in the error term.  Hence, once we
start putting any lagged values of $y_{it}$ into explanatory
variables, dynamic completeness is an intended assumption, which
clearly implies sequential exogeneity. However, the strict exogeneity
assumption is necessarily false as we discussed before. In this case,
both the fixed effects (FE) estimator and the first difference (FD)
estimator are inconsistent.

Making decision which model to use and how many lags to include is
complicated by the fact that we are unlikely to have enough theory to
distinguish between the different models. As a result,
\citet*{Boef2008}, along with many others, argue that you should start
with a general model like the ADL and test down to a more specific
model, including the optimal values for $p$ and $q$.

\subsection{Spatial Panel Models}
\label{sec:spatial-panel-models}
In this section, we discuss cross-sectional dependence (XSD) in
panels. This can arise, for example, if spatial diffusion processes
are present, relating panel members (in our case counties) in a way
that depends on a measure of distance. The Pesaran $CD$ test and
$CD(p)$ test \citep{Pesaran2004} are used to detect XSD. These tests
are all based on the averages over the time dimension of pairwise
correlation coefficients for each pair of cross-sectional units, while
the $CD(p)$ test takes into account an appropriate subset of
neighboring cross-sectional units to check the null of no XSD against
dependence between neighbors only. To do so, a spatial weights matrix
$W$ is needed for the $CD(p)$
test.

In our data set, both tests show the presence of XSD at 0.000
level. This is not surprising, since it seems likely that employment
might be correlated across counties. Therefore, we use a spatial panel
model to study this spatial interaction effect across counties and try
to capture the indirect effect of a county's energy sector development
on employment within other counties. Spatial interaction effects could
be due to competition or complementarity between counties, spillovers,
externalities, regional correlations in industry structures and many
other factors.

Interactions between spatial units are typically modeled in terms of
some measure of distance between them, which is described by a spatial
weights matrix $W$. $W$ is a $254 \times 254$ non-negative matrix, in
which the element $w_{ij}$ expresses the degree of spatial proximity
between the pair of objects $i$ and $j$. Following \citet{Kapoor2007},
the diagonal elements $w_{ii}$ are all set to zero to exclude
self-neighbors. Furthermore, only neighborhood effects are considered
in this paper, that is, $W$ is a contiguity matrix\footnote{$W$ is
  also called as adjacency matrix.}:
\begin{align}
  \label{eq:wmat}
  w_{ij} = 
  \begin{cases}
    1, \text{ if $i$ and $j$ are neighbors}\\
    0, \text{ otherwise}.
  \end{cases}
\end{align}
Then the contiguity matrix is transformed into row- standardized form,
which assumes the impact on each unit by all other neighboring units
are equal. Given a spatial weights matrix $W$, a family of related
spatial econometric models can be expanded from equation
\eqref{eq:basic}:
\begin{align}
  \label{eq:full}
  E_{it} = \rho\sum_{j=1}^N w_{ij}E_{jt} + \beta_1{wells}_{it} + \beta_2{wcap}_{it} + u_{it},
\end{align}
where $\rho$ is the spatial autoregressive coefficient. The composite
error $u_{it}$ can be specified in two ways. For the first case,
$u_{it} = c_i + \epsilon_{it}$, while $\epsilon_{it}$ is a vector that
follows a spatial autoregressive process of the form
\begin{align}
  \label{eq:epsilon_rho}
  \epsilon_{it} = \lambda\sum_{j=1}^N w_{ij}\epsilon_{jt} + \nu_{it}
\end{align}
with $\lambda$ being the spatial autocorrelation parameter.

A second specification for the error $u_{it}$ is considered in
\citet{Kapoor2007}. They assume that spatial correlation applies to
both unobserved individual effects and the remainder error
components. In this case, $u_{it}$ follows a first order spatial
autoregressive process of the form:
\begin{align}
  \label{eq:u_rho}
  u_{it} = \lambda\sum_{j=1}^N w_{ij}u_{jt} + \epsilon_{it}
\end{align}

and $\epsilon$ follows an error component structure
\begin{align}
  \label{eq:epsilon_fixed}
 \epsilon_{it} = c_i + \nu_{it}
\end{align}
to further allow $\epsilon_{it}$ to be correlated over time.  Although
the two data generating processes look similar, they do imply
different spatial spillover mechanisms governed by a different
structure of the implied variance covariance matrix. In this paper, I
consider the implementation of the second error term specification,
which leads to a simpler variance matrix that is also easier to
invert.

A spatial panel model may also contain a spatially lagged dependent
variable ($\rho\neq 0$), known as a spatial autoregressive (SAR)
model. Alternatively, there also could be a spatial autoregressive
process in the error term ($\lambda\neq 0$), in which case the model
is known as a spatial error model (SEM).

The spatial lag model posits that the dependent variable depends on
the dependent variable observed in neighboring units and on a set of
observed local characteristics. The spatial error model, on the other
hand, posits that the dependent variable depends on a set of observed
local characteristics and that the error terms are correlated across
the space.

\section{Estimation Methods and Results}
\label{sec:estimation-methods}
Let us first turn to the general unobserved effect model
\eqref{eq:basic}. The pooled OLS estimator can be used to obtain a
consistent estimator of $\mathbf{\beta}$ only if the explanatory
variables satisfy contemporaneous exogeneity and zero correlation with
$c_i$. In section \ref{sec:strict-exogeneity}, we assumed that
contemporaneous exogeneity holds. However, as we discussed in section
\ref{sec:assumptions}, explanatory variables are necessarily
correlated with unobserved individual effects $c_i$. In addition, F
tests of poolability show pooled OLS estimation is
inconsistent. Hence, the pooled OLS estimator should not be used.

Since random effects analysis also requires orthogonality between
$c_i$ and observed explanatory variables, as well as strict
exogeneity, it is also inconsistent and inappropriate to be used.  The result of the 
Hausman test, namely $ \chi ^2 = 601.67$ with a  p-value close to zero, again
indicates that the random effects approach is inconsistent.


With a fixed effects (FE) or first difference (FD) approach,
the explanatory variables are allowed to be arbitrarily correlated with
$c_i$, but strict exogeneity of them conditional on $c_i$ is still
required. The idea behind the fixed effects approach is to transform the
equations by removing the inter-temporal mean and thereby eliminating
the unobserved effect $c_i$. One can 
then apply pooled OLS to get FE estimators. Similarly, the FD approach transforms the equations by lagging the model one period and
subtracting, then applying pooled OLS to get FD estimators.

As we mentioned in section \ref{sec:data-stationarity}, we
found that more than half of counties have highly persistent
employment series. Using time series with a unit root process in a
regression equation could be very misleading and cause a  spurious
regression problem. In that case, first differencing should be used to remove any potential unit roots in $E_{it}$ and explanatory variables, so spurious regression is no longer an issue.



\subsection{Estimation of FDL model}
\label{sec:estimation-fdl-model}

As noted in section \ref{sec:strict-exogeneity}, including lagged dependent variables in the model violates strict exogeneity, implying that the resulting autoregressive FD estimator may suffer from  asymptotic bias. Therefore, in this section we drop all lagged dependent variables and use the FDL approach, equation \eqref{eq:FDL}. We verified that the strict exogeneity assumption holds as long as enough lags of the explanatory variables are included. 

\subsubsection{First Difference Estimator}
\label{sec:first-diff}
To get the FD estimator, we lagged the model (\ref{eq:FDL}) one period and subtracted to obtain:
\begin{align}
  \label{eq:FD}
  \Delta E_{it} = \sum_{k=0}^{q} \beta_k\Delta wells_{i,t-k}+\sum_{k=0}^{q} \delta_k\Delta wcap_{i,t-k}+ \theta_0 + \theta_t + \Delta u_{it}, t = 2,3,...,T,
\end{align}
Note that rather than drop an overall intercept and include the
differenced time dummies $\Delta \theta_t$, we estimated an intercept
and then included time dummies $\theta_t$ for $T-2$ of the remaining
periods. Because these sets of regressors involving the time dummies
are nonsingular linear transformations of each other, the estimated
coefficients on the other variables do not change.

If our tests find no serial correlation, then the FD estimator is the
pooled OLS estimator from the regression model \eqref{eq:FD}. The only
remaining issue involves interpreting the results and  deciding how to choose the number of  lags
$q$. If our tests find serial correlation, then pooled OLS is
consistent but inefficient and the standard errors are wrong.

To test for the presence of serial correlation in $\Delta u_{it}$, I
use Breusch-Godfrey test and Wooldridge's test for serial correlation
in panels. Both tests reject $H_0$ and show serial correlation remains
in the idiosyncratic errors. I then increased $p$ one by one and ran
the test again until $p = 36$. The results showed that serial
correlation remained no matter how many lags of the explanatory
variables were included. Existence of serial correlation may imply
that the model fails to capture the actual dynamic adjustment
process. Nevertheless, the FDL model does have the advantage that it
satisfies the requirement of strict exogeneity.

When the serial correlation remains in the error term, we should compute a robust variance
matrix for the FD estimator, which accommodates a fully general structure with
respect to heteroskedasticity and serial correlation in $\Delta
u_{it}$. Following \citet{Arellano1987}, this robust variance matrix
is consistent and it relies on large $n$ asymptotics with small $T$.

To determine the appropriate lag length $q$, I posited a maintained
value that should be larger than optimal $q$. Here I use $24$. Then I did sequential $F$
tests on the last $24>p$ coefficients, stopping when the test rejects
the $H_0$ that the coefficients are jointly zero at 5\% level. Using a
robust variance matrix to calculate the $F$ statistics, we drop 18 lagged
explanatory variables and assign $q = 6$.


The estimation results are reported in Table \ref{table:FD_results},
with both robust standard errors and usual FD standard errors. From
the regression results, and using robust standard errors, all
coefficients of wind installed capacity to be close to zero and not
statistically significant(except the order 2 lag is negative and
significant at 5\% level). A joint $F$ test on $H_0:\delta_k = 0$ for
$k = 0,1,\ldots,6$ shows $F(7, 31734) = 0.78$ with $p-value = 0.6001$,
and cannot reject $H_0$.


\begin{table}[h]\centering
\begin{tabular}{l l l l}\hline\hline 
\multicolumn{1}{l}
{\textbf{Variable}}
 & {\textbf{Coefficient}}  & \textbf{(Std. Err.)}& \textbf{(Robust SE.)} \\ \hline
$wells_{it}$  &  16.31  & (5.396)$^{**}$ &[6.06]$^{**}$ \\
$wells_{i,t-1}$  &  13.17  & (6.666)$^{*}$ &[7.081]$^{.}$ \\
$wells_{i,t-2}$  &  0.932  & (7.025)&[2.929] \\
$wells_{i,t-3}$  &  -5.519  & (7.127)&[6.006] \\
$wells_{i,t-4}$  &  12.23  & (7.119)$^{.}$&[8.705] \\
$wells_{i,t-5}$  &  17.89 & (6.875)$^{**}$&[11.13] \\
$wells_{i,t-6}$  &  22.46  & (5.686)$^{***}$&[12.91]$^{.}$ \\
$wcap_{it}$  &  -0.756  & (1.235)&[0.923] \\
$wcap_{i,t-1}$  &  -0.755  & (1.653)&[0.594] \\
$wcap_{i,t-2}$  &  -0.739  & (1.864)&[0.332]$^{*}$ \\
$wcap_{i,t-3}$  &  -0.212  & (1.923)&[0.323]  \\
$wcap_{i,t-4}$  &  0.111  & (1.865)&[0.374] \\
$wcap_{i,t-5}$  &  0.250  & (1.654)&[0.432] \\
$wcap_{i,t-6}$  &  -0.178  & (1.236)&[0.266] \\
\hline
\multicolumn{4}{l}{\textsuperscript{***}$p<0.001$, 
  \textsuperscript{**}$p<0.01$, 
  \textsuperscript{*}$p<0.05$, 
  \textsuperscript{$\cdot$}$p<0.1$}
\end{tabular}
\caption{FD Estimation Results, $q = 6$}
 \label{table:FD_results}
\end{table}

% Next we need test for the presence of serial correlation in $\Delta
% u_{it}$, I use Breusch-Godfrey test and Wooldridge's test for serial
% correlation in panels. Both tests accept the $H_0$\footnote{$p-value =
%   0.3656$ and $p-value = 0.3096$, respectively} and we cannot reject
% that no serial correlation remains in the idiosyncratic errors. Then
% we could perform the OLS and obtain the FD estimator.

% The estimation results are reported in Table \ref{table:FD_results} with standard errors. From the table, we find six of seven coefficients of the wind installed capacity are negative and all are  insignificant. % A joint $F$ test on $H_0:\delta_k = 0$ for
% % $k = 0,1,\ldots,6$ shows $F(7, 31734) = 0.78$ with $p-value = 0.6001$.
% % Hence we cannot reject $H_0$ and
% Hence the impact of wind activity on employment is not significant from zero. 

On the other
hand, we found  $wells_t$, $wells_{t-1}$,... and $wells_{t-6}$ to be jointly
significant: the $F$ statistic has a $p-value = 0.0007$. However, because of the often substantial correlation in $wells$ at
different lags, that is, due to multicollinearity, it can be difficult
to obtain precise estimates of the individual $\beta$s. The estimated long run multiplier
is 4.4. Adding the estimated coefficients of
current and lag variables, we have long term multipliers $LRP_{wells}
= 77.46$ and $LRP_{wcap} = -2.278$. Hence we conclude that 77 jobs
could be created in 6 months after each well completion, while the
impact of wind activity on employment is not statistically significantly different from zero.

% To obtain the standard error of estimated
% LRP, let $\theta_0$ denote the LRP and write $\beta_0$ in terms of
% $\theta_0$ and $\beta_1$-$\beta_{11}$. Next substitute for $\beta_0$
% in the model to get:
% \begin{align}
%   \label{eq:LRP}
% {E}_{it} &=\theta_0{wells}_{it} + \beta_1({wells}_{i,t-1}-{wells}_{it})... +\beta_{11}({wells}_{i,t-11} \\
% &-{wells}_{it}) + \delta_0{wcap}_{it}+ \delta_1{wcap}_{i,t-1} + ...+\delta_{11}{wcap}_{i,t-11} +\sum_{s=2}^{T}ds_t + u_{it} 
% \nonumber
% \end{align}

% From the equation above, we can obtain the coefficient and associated standard error: $\hat{\theta_0} = 6.2445$ and $se(\hat{\theta_0}) = 0.3879$. Therefore LRP $\hat{\theta_0}$ is very statistically significant even though none of the $\hat{\beta_j}$ except $\hat{\beta_0}$ is individually significant. The 95\% confidence interval for the LRP is about 5.484 to 7.004.

The coefficient of wells at $T=0$ are significant
at $0.01$ level, and the contemporaneous effects of wells on employment is
0.024\%. It means that for each additional well drilled, employment
will increase 0.024\% in that month. Then the impact remains significant
at $0.05$ level when $T = 6$. After six months, the impact of
well drilling fades and the employment falls back to the original
level. We graph the estimated short run impact of $wells_k$ and
$wcap_k$ as a function of $k$ in Figure \ref{fig:FDlag6full}. The lag
distribution summarizes the dynamic effects that a temporary increase
in explanatory variables has on the dependent variable. From Figure
\ref{fig:FDlag6full}(a), we see a generally decline trend on the impact of wells as time passes, which is expected because workers leave after the well completion. Then the employment growth rate increases starting at month $4$. It is probably because the emerging of new business opportunities in the neighborhood due to the well drilling activity. Figure \ref{fig:FDlag6full}(b) shows the impact of new wind capacity added. It may show some useful trending information even though the results is hardly significant.  We see the growth rate decline first and then increase. It peaks about four months after the wind farm construction and then declines again. 


When we graph the estimated short run multipliers $wells_k$ and
$wcap_k$ as a function of $k$, we obtain the lag distribution, which
summarizes the dynamic effect that a temporary increase in explanatory
variables has on the dependent variable. In Figure \ref{jobfd}, the lag
distribution implies that the largest effect is at the first and the
last lag.
\begin{figure}[h]
  \centering \includegraphics[width=0.7\textwidth]{ch3/jobfd.pdf}
  \caption{FD Impact multipliers in $q=6$ periods}
  \label{jobfd}
\end{figure}

\begin{figure}[h]
  \centering
\subfloat[]{\label{fig:fdlag6}\includegraphics[width=0.48\textwidth]{ch3/fdlag6.pdf}}
\subfloat[]{\label{fig:fdlag6newcap}\includegraphics[width=0.48\textwidth]{ch3/fdlag6newcap.pdf}}
\caption[FD estimation results with 6 lags]{FD estimation results with $q = 6$: (a) wells (b) wind capacity}
\label{fig:FDlag6full}
\end{figure}

% Assuming all jobs created by well drilling last for one
% month, we sum up the 6 coefficients of wells and divide by 12 to get a
% full time equivalent growth rate: 0.01465\%. Given 3889 new directional/fractured wells were drilled in Texas in 2011, the results imply that about 54446 jobs would have had been created.The total employment of
% Texas in 2010 is $10,182,150$,
% Given 
Note that we have a really low $R^2 = 0.00084$, which measures the
amount of variation in employment that is explained by $wells$. Since
oil and gas related employment is only 2.6\% of the total employment
in Texas, a low explanatory power of the regression model is to be
expected. 



\subsection{Estimation of ADL  model}
\label{sec:adl-dynamic-model}
In this section, we include lag dependent variables into the
model. Since the ADL model contains lagged dependent variables, as we
discussed in section \ref{sec:estimation-fdl-model}, the strict exogeneity
assumption is violated, and neither FE nor FD estimators are
consistent. In this case, the generalized method of moments (GMM) is used.% However, if we maintain the assumption of contemporaneous
% exogeneity, we could show that the FE estimator generally has an
% inconsistency that shrinks to zero at the rate $1/T$, while the
% inconsistency of the FD estimator is essentially independent of size
% $T$ \citep{Wooldridge2002}. Therefore, under contemporaneous
% exogeneity, the FE estimator has an advantage over the FD estimator
% when T is large.



\subsubsection{Generalized method of moments  estimator}
\label{sec:fixed-effects-estim-1}
Following \citet*{Arellano1991}, we applied the two-way GMM method to estimate the ADL model, shown in equation \eqref{eq:ADL}. We again need to assign appropriate $p$ and $q$ to the model before we estimate it. As before, we start with large enough $p$ and $q$ that they are guaranteed to be larger than their optimal value: $p = q = 24$.

\begin{table}[h]\centering
\begin{tabular}{l  l  l}
\hline
\hline 
\multicolumn{1}{l}
{\textbf{Variable}}
 & {\textbf{Coefficient}}  & \textbf{(Std. Err.)}\\
 \hline
$E_{i,t-1}$      &0.8914825&	0.0057468$^{***}$\\	  
$E_{i,t-2}$      & 0.0062052&	0.0055876	    \\		
$wells_{it}$    &0.0004499 &	0.0001068$^{***}$\\
$wells_{i,t-1}$  & 0.0001178&	0.0001046	 \\
$wells_{i,t-2}$  & 0.0000916&	0.0001029\\
$wells_{i,t-3}$  &   0.000056&	0.0001037\\
$wells_{i,t-4}$  &    0.0000539&	0.0001041	   \\
$wells_{i,t-5}$  &   0.0001362&	0.0001082	 \\
$wells_{i,t-6}$  &  0.0002677&	0.0001132$^{*}$	\\
\hline
$wcap_{it}$     &  -9.00e-06&	0.0000248\\
$wcap_{i,t-1}$  &  -0.0000184&	0.0000243\\
$wcap_{i,t-2}$  & 0.0000239  &	0.0000237\\
$wcap_{i,t-3}$  &  0.0000107&	0.0000236 \\
$wcap_{i,t-4}$  &  0.0000242&	0.0000237	    \\
$wcap_{i,t-5}$  &  -0.0000129&	0.0000243	\\
$wcap_{i,t-6}$  &  -9.63e-06&	0.0000249	  \\
\hline
\multicolumn{3}{l}{\textsuperscript{***}$p<0.001$, 
  \textsuperscript{**}$p<0.01$, 
  \textsuperscript{*}$p<0.05$} \\
\hline
\hline
\end{tabular}
\caption{GMM Estimation Results, $p = 2$, $q = 6$}
 \label{table:GMM_results}
\end{table}

When we include two lagged dependent variables $E_{i,t-1}$ and  $E_{i,t-2}$,  the Wooldridge's test for serial correlation reports $\chi^2 = 0.0333$ with $p-value = 0.8551$. Hence we can conclude that the error $u_{it}$ is then serially uncorrelated. In this
case, we say the model is dynamically complete since enough lags have
been included so that further lags of dependent and independent
variables do not matter for explaining $E_{it}$. Hence we set $p = 2$.

As in previous section I then set $q = 6$ and estimated the two way
Arellano-Bond GMM regression. The results are in Table
\ref{table:GMM_results}.  Note that both Wald test and the joint
$F$ test cannot reject the coefficients of wind capacity $\delta_0 =
\ldots = \delta_{6} = 0$ in model, which implies no impact of wind
activity on local employment. In the following discussion we therefore
focus solely on the $wells$ variable.

 % when we included one lagged dependent variable $E_{i,t-1}$,
% Wooldridge's test for serial correlation reports $\chi^2 = 30.189$ with
% $p-value = 3.919e-8$. Strong serial correlation implied that the
% dynamic data generation processes has not been fully captured.

\begin{figure}[h]
  \centering
\subfloat[]{\label{fig:gmmwells}\includegraphics[width=0.48\textwidth]{ch3/gmmwells.pdf}}
\subfloat[]{\label{fig:gmmwind}\includegraphics[width=0.48\textwidth]{ch3/gmmwind.pdf}}
\caption[GMM estimation results, $p =2 $, $q = 6$]{GMM estimation results with $p=2$, $q = 6$: (a) wells (b) wind capacity}
\label{fig:GMMfull}
\end{figure}


The coefficients on the wells variable lags then reveal information
about the short-run response of employment: $E_{it}$ initially go up
by $\beta_0$ in period 1, then by $\beta_1+\lambda_1\beta_0$ in period
2, and then by $\beta_2+\lambda_1(\beta_1+\lambda_1\beta_0) +
\lambda_2\beta_0$ in period 3, etc. It takes about 25 months for the impacts to decrease to zero. Comparing these results with those from the  FDL model, effects from 
previous periods have greater persistence in the ADL model. Figure \ref{fig:GMMfull} graphs
the resulting dynamic response of employment to a unit increase in
$wells_{it}$ and $wcap_{it}$. From Figure \ref{fig:GMMfull}(a), we find the impact of well peaks at $6^{th}$ month after completion, which has some similarity to the FD estimation results (See Figure \ref{fig:FDlag6full}(a)).

%  For comparison, we have also included the pattern estimated in the previous section and one can see that they 
% The
% long-run effect, referred to as the long-run propensity(LRP) or
% long-run multiplier, is given by
% $\frac{\sum_{k=0}^{19}\beta_k}{1-\lambda_1-\lambda_2} = 121.13$, which
% is very close to the one estimated from FDL model using FGLS. The new
% equilibrium employment will be 121.13 higher than the original
% equilibrium employment. Full results are reported in
% Appendix A\ref{app:C}, Table \ref{table:ADLfull} on page \pageref{table:ADLfull}.
%  \begin{figure}[h]
%   \centering \includegraphics[width=0.8\textwidth]{ch3/twfe.pdf}
%   \caption{Short run impact of shale activity on employment}
%   \label{twfe}
% \end{figure}

Note that from the results, the sum of the two estimated coefficients
of the lagged dependent variables is 0.9. Although the test
$\lambda_1+\lambda_2 = 1$ is rejected at 1\% level, we may still be
concerned that employment is a unit root process. Recall that in
section \ref{sec:data-stationarity}, we checked data stationarity and
found employment in some counties has unit root although some also do
not. If the dependent and independent variables are non-stationary,
there might be a concern that the regression results are spurious. Investigating this issue in more detail is something that will be done in future research. We believe that the large persistence of employment is probably due to the small explanatory power of well drilling on employment, which is reasonable since employment in shale gas sector is a rather small component of the total employment. 


% \subsubsection{Generalized Method of Moments Estimator}
% \label{sec:gener-meth-moments}

% Follow Arellano and Bond(1991). 
% \begin{itemize} 
% \item Monthly data cannot be used since computer memory is limited. (require $>$ 32GB). 
% \item Have to take log of employment. Otherwise the cov matrix is singular.  
% \item Use it as a robust check?
% \end{itemize}


\subsection{Estimation of Spatial Panel Models}
\label{sec:spatial-panel-model}
Recall that in \ref{sec:spatial-panel-models} we discussed the theory behind the spatial autoregression (SAR) and spatial error model (SEM).
In the SAR model, the inclusion of the dependent variable on the right hand side of the above equation introduces simultaneity bias and the OLS estimator is no longer unbiased and consistent, while in the SEM, the OLS estimator is unbiased, but inefficient. Therefore, maximum likelihood estimation is used to estimate the parameters of both models. 

Both the SAR and SEM models are estimated allowing for two-way fixed effects. The results are reported in Table \ref{tab:sp_effects_emp}. %
%  \begin{table}[h]
%    \centering
%    \begin{tabular}{|l|c|c|c|c|}  
%      \hline
% \multicolumn{5}{|l|}{SAR Coefficients:}\\
% \hline
%       & Estimate &Std. Error &t-value &Pr$(>|t|)$\\
% \hline
% $\rho$ &0.1340 &0.0082 &16.36   &$<2e-16^{***}$\\
% wells  &7.2538 &0.2780 &26.09   &$<2e-16^{***}$\\
% newcap &0.1569 &0.6724 &0.2334   &0.8154    \\
% \hline
% \multicolumn{5}{|l|}{SEM Coefficients:} \\
% \hline    
% $\lambda$   & 0.1480 &0.0082 &18.07   &$<2e-16^{***}$\\
% wells  &7.9494 &0.2905 &27.37   &$<2e-16^{***}$\\
% newcap &0.4846 &0.6884  &0.704   &0.4814   \\
% \hline 
% \multicolumn{5}{|l|}{Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 } \\
% \hline
%   \end{tabular}
%   \caption{Spatial interaction effects on employment}
%   \label{tab:sp_effects_emp}
% \end{table}
\begin{table}[h]
   \centering
   \begin{tabular}{|l|c|c|c|c|}  
     \hline
\multicolumn{5}{|l|}{SAR Coefficients:}\\
\hline
      & Estimate &Std. Error &t-value &Pr$(>|t|)$\\
\hline
$\rho$ &0.3070 &7.4715e-03& 41.0854  &$<2e-16^{***}$\\
wells  &2.1567e-03 & 1.3034e-04& 16.5461& $<2e-16^{***}$\\
newcap &-2.9295e-05 & 6.3850e-05& -0.4588  & 0.6464    \\
\hline
\multicolumn{5}{|l|}{SEM Coefficients:} \\
\hline    
$\lambda$ &0.3041&  7.5100e-03 &40.4857 & $<2e-16^{***}$\\
wells     &1.9255e-03 & 1.4138e-04& 13.6195   &$<2e-16^{***}$\\
newcap    & -2.6024e-05 & 6.3814e-05 &-0.4078  & 0.6834    \\
\hline 
\multicolumn{5}{|l|}{Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 } \\
\hline
  \end{tabular}
  \caption{Spatial interaction effects on employment}
  \label{tab:sp_effects_emp}
\end{table}
Following \citet{LeSage2009}, the expectation of the SAR model $y = \rho Wy +X\beta+\epsilon$ is
\begin{align}
  \label{eq:SAR}
  E(y) = (I_N-\rho W)^{-1}X\beta 
\end{align}
We  thus find that employment in county $i$ depends on developments in  neighboring counties as workers in bordering counties migrate to take advantage of new job opportunities due to shale and wind activity. This provides a motivation for the spatial lag variable $Wy$.

The own- and cross-partial derivatives for the SAR model take the form of an $N\times N$ matrix that can be expressed as:
\begin{align}
  \label{eq:SARpartial}
  \partial y/\partial x_r' = (I_N-\rho W)^{-1}I_N\beta_r 
\end{align}

These partial derivatives show how drilling/wind activities in county $j$ influence employment in county $i$. For the $r$th explanatory variable, the average of the main diagonal elements of this matrix is labelled as the direct effect, and the average of cumulative off-diagonal elements over all observations corresponds to the indirect effect. The average total effect will be the sum of the two.

This model implies that direct effect of well drilling activity on employment is 0.0022, and it is significant at the 0.000 level. The direct effect measures how wells drilled in a particular county affect employment in that same county. The result shows that about 0.22\% jobs would be created by drilling a well in the same county.  Also, the indirect effect estimate of well drilling activity is 9.1433e-4, which makes the total effect grow to 0.31\%. % Assuming that all the jobs created are short-term and only last for 1 month, given 5482 new directional/fractured wells were drilled in Texas in 2011, about 90,000 jobs would have been created. If we assume 10\% of the jobs are long term insteads the number will be doubled to 180,000. 
The direct and indirect effects of wind activity are not statistically significant as we found from the time series models. Hence, wind farm installation and construction has not been found to have any impact on employment. 

% Comparing to the results without considering spatial interaction effects, which are 6 jobs increased due to well drilling activity, we could find that with spillover effect considered, energy activity positively affects employment to a larger degree.The baseline is that ignoring spatial correlation may distort the results and underestimate the effect of energy industry activity on employment.

\subsection{Estimation Results on Wage}
\label{sec:estim-results-wage}

We also looked for impacts of shale gas and wind developments on
weekly wages instead of employment. Like the employment regression
results, both the FD and the GMM approaches have been used. The results show that neither
coefficients of wells nor wind capacity are jointly significant,
although the impact of wells is about 3 times larger. %  Figure
% \ref{fig:fdwage} is the short run impact of wells and wind capacity on
% wage.  For the wage, the regression coefficients show the impact of
% drilling wells peaks after 4 months and then declines over time, while
% the impact of wind capacity installation grows along the time.
% % Since the average weekly wage is 576, the weekly wage will increase about 0.2\% if 10 wells are drilled, and 0.5\% if 100MW of wind capacity has been installed. 
%  \begin{figure}[h]
%   \centering
% \subfloat[]{\label{fig:fdwagewell}\includegraphics[width=0.48\textwidth]{ch3/fdwagewell.pdf}}
% \subfloat[]{\label{fig:fdwagewind}\includegraphics[width=0.48\textwidth]{ch3/fdwagewind.pdf}}
% \caption[FD estimation of wage, $q = 6$]{FD estimation of wage: (a) wells (b) wind capacity}
% \label{fig:fdwage}
% \end{figure}

% \begin{figure}[!h]
%   \centering \includegraphics[width=0.7\textwidth]{ch3/wagest1.pdf}
% \caption{Short run impact of shale/wind activity on wage}
%   \label{wagest}
% \end{figure}

The spatial panel regression results for wages are shown in Table
\ref{tab:sp_effects_wage}. The spatial coefficients $\rho$ and
$\lambda$ are all very significant and show large spillover
effects. The coefficients of wells $\beta_1$ and of wind $\beta_2$ are
significant at $<0.1$
level. 
Using formula (\ref{eq:SARpartial}), the direct and indirect effect of well drilling activity on wage are 3.4625e-04 and 1.2978e-04, respectively, and they are significant at 0.01 level. From the result, we could say the total effect on wage is 0.0476\% per well drilled, of which 0.0346\% is due to drilling activity in the same county, and 0.013\% is attributed to drilling activity in the neighbors. The effects of the wind activity on wage is smaller than that of shale activity but still statistically significant at 0.1 level. The total effect is 0.0146\% per MW, with about 0.01066\% of direct effect and 0.004\% of indirect effect.
% What is more, the LM tests show strong jointly regional random effects and spatial autocorrelation, but we cannot reject zero spatial autocorrelation at 0.1 level ($p-value = 0.3005$).% , are in line with the results without spatial interaction effects but more significant.

\begin{table}[h]
   \centering
   \begin{tabular}{|l|c|c|c|c|}
     \hline
\multicolumn{5}{|l|}{SAR Coefficients:}\\
\hline
      & Estimate &Std. Error &t-value &Pr$(>|t|)$\\
\hline
$\rho$  &0.2844 & 7.6068e-03 &37.3851 &$<2e-16^{***}$\\
$wells$ & 3.4028e-04 &1.1328e-04 & 3.0038 & 0.002666$^{**}$\\
$newcap$ & 1.0478e-04 &5.5565e-05 & 1.8856 & 0.059342$^.$ \\
\hline
\multicolumn{5}{|l|}{SEM Coefficients:} \\
\hline    
$\lambda$   & 0.2843 & 7.6083e-03 & 37.3622   &$<2e-16^{***}$\\
$wells$  & 2.7937e-04 & 1.2230e-04 & 2.2843&  0.02235$^*$  \\
$newcap$ & 1.1063e-04 & 5.5492e-05 & 1.9937 & 0.04619$^*$ \\
\hline
\multicolumn{5}{|l|}{Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 } \\
\hline
  \end{tabular}
  \caption{Spatial interaction effects on wage}
  \label{tab:sp_effects_wage}
\end{table} 


\section{Conclusions}
\label{sec:conclusions}
In this study, we develop a general econometric model to compare job creation in wind power versus that in the shale gas sector. We have discussed the advantages and disadvantages of
a number of different models. We then  estimated them using county level data in Texas from 2001 to 2011. Despite different estimation methodologies, the results were quite consistent and show that shale development and well drilling activity have brought strong employment and wage growth to Texas, while the impact of wind industry development on employment and wage statewide is  quite small and not statistically significant.

% First, any potential jobs created in the renewable sector have to be
% weighted against job losses in other sectors. Policy ought to be
% concerned about the overall, or net level of job creation. Second,
% from the point of view of US energy policy,we are interested in
% knowing how many green jobs are created in the US, as opposed to jobs
% created in other parts of the world. 

% \subsubsection{GM Implementation}
% \label{sec:gm-implementation}
% Kapool et al. (2007) suggest a general
% Reference Mutl and Pfaffermayr (2011) and Piras (2011).
% \begin{align}
%   \label{eq:logemp}
%   log(emp_{it}) = \rho\sum_{j=1}^N w_{ij}emp_{jt} + \beta_1{wells}_{it} + \beta_2{wcap}_{it} + u_{it}
% \end{align}
  

% Denote \# of wells completed in county $i$ in year $t$ is $N_{it}$. If $N_{it} \geq 5$, the county $i$ is considered as shale affected county since year $t$. If $N_{it} \geq 50$, then the county $i$ becomes the ``core" of the shale affected counties since year $t$.

% average employment growth rate of shale affected counties
% average employment growth rate of core counties

% Jobs come from shale oil \& gas production chain, from exploration, drilling, completion, to production.

% what I could get is \# of job creation per well each year.  


% \subsection{Well Type Effects}
% \label{sec:well-type-effects}
% In this section, we are going to discuss if different type of wells could affect the employment and wage differently. The regression model changes to
% \begin{align}
%   \label{eq:wellType}
% {E}_{it} =\beta_1 {gas}_{it} + \beta_2 {oil}_{it}+ \beta_3{others}_{it} + \mu + \alpha_i + \gamma_t + \epsilon_{it}
% \end{align}

% Besides applying the regression to the whole data set, a subset of data, in which all counties without drilling activities are removed, has been used. In both cases, the random effects model is inconsistent based on Hausman test, so only results of fixed effects model is listed in Table \ref{tab:wt_effects_emp}. We could find that number of gas wells has a positive and significant effect on employment, which is about 22 jobs per well. On the other hand, the effects of oil wells is negative and not significant, while the coefficient of other wells is considerably negative and very significant, which I am not sure if it has any intuitive meaning, or simply because of coincidence.    
% \begin{table}[h]
%   \centering
%   \begin{tabular}{|l|c|c|c|}
%     \hline
%     & gas & oil & others\\
%     \hline
%     Fixed effects, whole dataset & 22.653 \small(***) & -30.759 & -412.598 \small(***) \\
%     \hline
%     Fixed effects, partial dataset & 21.6065 \small(***) & -35.005  \small(.) & -383.9622 \small(***) \\
%     \hline
%     \multicolumn{4}{|l|}{Significant codes: $0$ `` *** " 0.001 `` ** " 0.01 `` * " 0.05 `` . " 0.1 `` '' 1} \\
%     \hline
%   \end{tabular}
%   \caption{Well type effects on employment}
%   \label{tab:wt_effects_emp}
% \end{table}

% When it comes to wage, an interesting result is that the coefficient of oil is positive and very significant, while the coefficient of gas is close to zero and not significant at all. So the weekly average wage would rise 42 cents per well drilled in the county. There are 12 counties 19 observations that have more than 50 oil wells drilled annually. The weekly average wage of all industries in these counties rise \$39.72 in average, roughly 5.4\%. The complete results is in Table \ref{tab:wt_effects_wage}.
% \begin{table}[h]
%   \centering
%   \begin{tabular}{|l|c|c|c|c|}
%     \hline
%     & gas & oil & others & Intercept \\
%     \hline
%     Random effects, whole dataset & 0.0222 & 0.5833 \small(***) & -1.4449 \small(**) & 591.1161 \small(***)\\
%     \hline
%     Fixed effects, whole dataset & -0.0092 & 0.4188 \small(***)& -0.9083 & \\
%     \hline
%     Hausman test & \multicolumn {4} {|l|} {chisq = 20.7288, df = 3, p-value = 0.0001198} \\
%     \hline  
%     Random effects, partial dataset & 0.001  & 0.455 \small(***) & -0.9865 \small(.) & 611.0104 \small(***)\\
%     \hline
%     Fixed effects, partial dataset & -0.0092 & 0.4188 \small(***)& -0.9083 & \\
%     \hline
%     Hausman test & \multicolumn {4} {|l|} {chisq = 9.348, df = 3, p-value = 0.025} \\ 
%     \hline 
%     \multicolumn{5}{|l|}{Significant codes: $0$ `` *** " 0.001 `` ** " 0.01 `` * " 0.05 `` . " 0.1 `` '' 1} \\
%     \hline
%   \end{tabular}
%   \caption{Well type effects on wages}
%   \label{tab:wt_effects_wage}
% \end{table}

% \subsection{Urban Area Effects}
% \label{sec:urban-area-effects}
% From Figure \ref{indiv}, we could see two points (or two clusters of points) are right on top and distant from the rest of data, which are the Harris county and Dallas county. Both counties are urban area and have very high employment and nearly zero drilling or wind power generation activity. These two outliers take large leverage in the regression and may misleading the results to the wrong direction,  since we expect substantial increase of employment would happen in these two counties due to the shale gas boost and new drilling activity. To avoid this problem, here we remove the two outlier observations from the data. The coefficients of wells using two-way fixed effects model and random effects model change from 17.36 and 18.14 to 19.30 and 20.02 respectively, which are a prominent $11\%$ increase.

% \begin{table}[h]
%   \centering
%   \begin{tabular}{|l|c|c|c|c|c|}
%     \hline
%     & $\beta_1$ & $\beta_2$ & $\lambda$ & $\rho$ & $\phi$ \\
%     \hline
%     Spatial error, random &   25.04 \small(***) & 4.27 \small(.) & 0.2348 \small(***) & & 442.67 \small(***) \\
%     \hline
%     Spatial error, two-way fixed & 19.91 \small(***) & 0.3505 ( ) & 0.1730 \small(***) & & \\
%     \hline
%     Spatial lag, random  & 23.51 \small(***) & 4.42 \small(*) &  & 0.2333 \small(***) & 443.36 \small(***)\\
%     \hline
%     Spatial lag, two-way fixed  & 18.51 \small(***)& 0.0289 ( ) & & 0.1714 \small(***)& \\
%     \hline
%     Lag + error, random  & 19.79 \small(***) & 4.1041 \small(*) & -0.3115 \small(***) & 0.4693 \small(***)& 446.39 \small(***)\\
%     \hline
%      Lag + error, two-way fixed\footnote{ The R program runs error. Will fix it later} & N/A & N/A & N/A & N/A & \\
%     \hline
%     \multicolumn{6}{|l|}{Significant codes: $0$ `` *** " 0.001 `` ** " 0.01 `` * " 0.05 `` . " 0.1 `` '' 1} \\
%     \hline
%   \end{tabular}
%   \caption{Spatial interaction effects on employment}
%   \label{tab:sp_effects_emp}
% \end{table}
% \begin{table}[h]
%   \centering
%   \begin{tabular}{|l|c|c|c|c|c|}
%     \hline
%     & $\beta_1$ & $\beta_2$ & $\lambda$ & $\rho$ & $\phi$ \\
%     \hline
%     Spatial error, random &   0.0158 \small( ) & 0.04 \small(***) & 0.5696 \small(***) & & 6.3680 \small(***) \\
%     \hline
%     Spatial error, fixed & 0.01 \small( ) & 0.0267 \small(***) & 0.3370 \small(***) & & \\
%     \hline
%     Spatial lag, random  & 0.0335 \small(**) & 0.0428 \small(***) &  & 0.5591 \small(***) & 6.4195 \small(***)\\
%     \hline
%     Spatial lag, fixed  & 0.0142 \small( )& 0.0236 \small(***) & & 0.3336 \small(***)& \\
%     \hline
%     Spatial lag + error, random  & 0.02531 \small(***) & 0.0243 \small(***) & -0.6931 \small(***) & 0.8386 \small(***)& 6.8750 \small(***)\\
%     \hline
%     Spatial lag + error, fixed\footnote{ The R program runs error. Will fix it later} & N/A & N/A & N/A & N/A & \\
%     \hline
%     \multicolumn{6}{|l|}{Significant codes: $0$ `` *** " 0.001 `` ** " 0.01 `` * " 0.05 `` . " 0.1 `` '' 1} \\
%     \hline
%   \end{tabular}
%   \caption{Spatial interaction effects on wage}
%   \label{tab:sp_effects_wage}
% \end{table}
% Make assumptions about functional form. whether you will be estimating elasticities or a semi-elasticity.
% The data used are at county level.
% how to difference the equations over time to remove time-constant unobservables. either difference across the months or use time-demeaning


% The distinction between a model and an estimation method should be made. A model represents a population relationship, DGP. 

% If there is a lagged dependent with no serial correlation, the
% inclusion of a lagged dependent variable will mean that OLS is biased
% but consistent (Keele \& Kelly 2006). However, if there is serial
% correlation, then the inclusion of a lagged dependent variable model
% will mean that OLS is both biased and inconsistent. (while this
% statement is true in the context of a specific model of serial
% correlation, it is not true in general, and therefore it is very
% misleading. whatever is included in $x_t$, pooled OLS provides
% consistent estimators of $\beta$ when ever $E(y_t|x_t) = x_t\beta$; it
% does not matter that the $u_t$ might be serially correlated). Note that
% you cannot solve this problem with the GLS procedure. Recall that for
% the GLS procedure to work, the first round OLS estimates must be
% consistent. However, this will not be the case if we include a lagged
% dependent variable since the lagged dependent variable will be
% correlated with the error term when there is serial correlation. Thus,
% we cannot use GLS to solve the problem of serial correlation when we
% have a lagged dependent variable.  Fortunately, in practice, models
% that do include a lagged dependent variable do not often show evidence
% of serial correlation - thus, the problem should be relatively
% rare. People have made a big deal about lagged dependent variables in
% the context of serial correlation (Achen 2000). The reason is that may
% people seem to think that disturbances are God-given i.e. that if God
% gives a process serial correlation, then it always has serial
% correlation. However, in reality, adding a lagged dependent variable
% to a model that has serial correlation does not necessarily mean that
% this new model also has serial correlation.A problem only arises if there is still some serial
% correlation left over once you have included the lagged dependent
% variable.  It turns out that tests for serial correlation in models
% that include a lagged dependent variable do generally indicate whether
% there is any serial correlation left over (Keele \& Kelly 2006). This
% is good since it means that we will know if we have a problem simply
% by testing for serial correlation - you should always conduct a BG
% test.  

 % From the joint LM test, we find random regional effects and spatial autocorrelation are jointly very significant ($p-value = 2.2e-16$), while conditional LM test shows a moderate spatial correlation in the errors of a model that possibly incorporates random effects at $0.01$ level. For the random effects model, only ``one-way'' individual effects  is available. Denoted $\phi = \sigma_{\mu}^2/\sigma_{\epsilon}^2$, results are listed in Table \ref{tab:sp_effects_emp}\footnote{ ``splm'' package of  R is used to run the estimation and tests.}. We could find that the coefficient of wells is about 19, and the impact of wind capacity is not significant, which don't change much from the results in section \ref{sec:spat-time-spec}.

% \begin{table}[h]
%    \centering
%    \begin{tabular}{|l|c|c|c|c|}  
%      \hline
% \multicolumn{5}{|l|}{SAR Coefficients:}\\
% \hline
%       & Estimate &Std. Error &t-value &Pr$(>|t|)$\\
% \hline
% $\rho$ &0.1730 &8.0711e-03 &21.4306   &$<2e-16^{***}$\\
% wells  &224.72 &1.2994e+01 &17.2935   &$<2e-16^{***}$\\
% newcap &0.05 &6.3660e+00 & 0.0079   &0.9937    \\
% \hline
% \multicolumn{5}{|l|}{SEM Coefficients:} \\
% \hline    
% $\lambda$   & 0.1734 &8.0956e-03 &21.4199   &$<2e-16^{***}$\\
% wells  &235.81 &1.3631e+01 &17.2995   &$<2e-16^{***}$\\
% newcap &0.47 &6.3738e+00  &0.0736   &0.9414   \\
% \hline
% \multicolumn{5}{|l|}{Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 } \\
% \hline
%   \end{tabular}
%   \caption{Spatial interaction effects on employment}
%   \label{tab:sp_effects_emp}
% % \end{table}
% Then the model \eqref{eq:FD} could be simplified to a static differencing model. Using the data to regress, we obtain the equation
% \begin{align}
%   \label{eq:FDL1}
% \Delta {E}_{it} =&6.08\,\Delta{wells}_{it}+0.18\,\theta_t+20.12, \;t = 2,\ldots,T. \\
% &(1.80)\quad \quad \quad\quad \quad (0.22)\quad (16.99) \nonumber \\
% &[3.89]\quad \quad \quad \quad\quad\; [0.20]\; \quad [15.80] \nonumber
% \End{Align}
% Where Usual Standard errors appear in parentheses and robust standard errors in brackets below the estimated coefficients. 

% \begin{table}
% \begin{center}
% \begin{tabular}{l D{.}{.}{10} l D{.}{.}{10} @{}}
% \toprule
%             & \multicolumn{1}{c}{Coefficients} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{Coefficients} \\
% \midrule
% $E_{i,t-1}$ & 0.88 \; (0.01)^{***} \\
% $E_{i,t-2}$ & 0.09 \; (0.01)^{***} \\
% $wells_{it}$ & 15.90 \; (5.37)^{**}  &$wcap_{it}$ & -0.83 \; (1.32) \\
% $wells_{i,t-1}$ & -18.78 \; (8.71)^{*} &  $wcap_{i,t-1}$ & 1.61 \; (1.86)     \\
% $wells_{i,t-2}$ & -12.71 \; (8.78)  &  $wcap_{i,t-2}$ & -0.75 \; (1.87)      \\
% $wells_{i,t-3}$ & 10.33 \; (8.83)   &  $wcap_{i,t-3}$ & -0.26 \; (1.85)     \\
% $wells_{i,t-4}$ & 24.24 \; (8.92)^{**}& $wcap_{i,t-4}$ & 0.29 \; (1.81)    \\
% $wells_{i,t-5}$ & -7.10 \; (8.96)   &$wcap_{i,t-5}$ & 0.29 \; (1.81)       \\
% $wells_{i,t-6}$ & -0.71 \; (9.09)   & $wcap_{i,t-6}$ & -0.74 \; (1.81)     \\
% $wells_{i,t-7}$ & -26.77 \; (9.16)^{**} & $wcap_{i,t-7}$ & 0.49 \; (1.81)    \\
% $wells_{i,t-8}$ & -10.40 \; (9.23)   & $wcap_{i,t-8}$ & 0.49 \; (1.81)     \\
% $wells_{i,t-9}$ & 32.35 \; (9.30)^{***}& $wcap_{i,t-9}$ & -0.26 \; (1.81)   \\
% $wells_{i,t-10}$ & -6.15 \; (5.88)   & $wcap_{i,t-10}$   & -0.33 \; (1.29)  \\
% \midrule
% Adj. R$^2$  & 0.01           & 0.01           & 0.01           \\
% \bottomrule
% \vspace{-3mm}\\
% \multicolumn{4}{l}{\textsuperscript{***}$p<0.001$, 
%   \textsuperscript{**}$p<0.01$, 
%   \textsuperscript{*}$p<0.05$, 
%   \textsuperscript{$\cdot$}$p<0.1$}
% \end{tabular}
% \caption{TWFE estimation on AGL model}
% \label{table:TWFE}
% \end{center}
% \end{table}

 % the coefficients of wells are significant at However,k because of the often
% substantial correlation in $wells$ at different lags, that is, due to
% multicollinearity, it can be difficult to obtain precise estimates of
% the individual $\beta$s. Adding the estimated coefficients of current
% and lag variables, we have long term multipliers $LRP_{wells} = 77.46$
% and $LRP_{wcap} = -2.278$. Hence we conclude that 77 jobs could be
% created in 6 months after each well completion, while the impact of
% wind activity on employment is not statistically significantly
% different from zero.



% If we use normal standard errors in the $F$ tests instead to choose $q$, only 5 lags would be dropped and $q = 19$. The short run impacts are graphed in Figure \ref{jobfd19} and full results are reported in Table \ref{table:jobfdfull}. The long run multipliers increase to 153 and -15, respectively.

% \begin{figure}[h]

%   \centering \includegraphics[width=0.7\textwidth]{ch3/jobfd19.pdf}
% \caption{FD Impact multipliers in $q=19$ periods}
% \label{jobfd19}  
% \end{figure}

% To obtain the standard error of estimated
% LRP, let $\theta_0$ denote the LRP and write $\beta_0$ in terms of
% $\theta_0$ and $\beta_1$-$\beta_{11}$. Next substitute for $\beta_0$
% in the model to get:
% \begin{align}
%   \label{eq:LRP}
% {E}_{it} &=\theta_0{wells}_{it} + \beta_1({wells}_{i,t-1}-{wells}_{it})... +\beta_{11}({wells}_{i,t-11} \\
% &-{wells}_{it}) + \delta_0{wcap}_{it}+ \delta_1{wcap}_{i,t-1} + ...+\delta_{11}{wcap}_{i,t-11} +\sum_{s=2}^{T}ds_t + u_{it} 
% \nonumber
% \end{align}

% From the equation above, we can obtain the coefficient and associated standard error: $\hat{\theta_0} = 6.2445$ and $se(\hat{\theta_0}) = 0.3879$. Therefore LRP $\hat{\theta_0}$ is very statistically significant even though none of the $\hat{\beta_j}$ except $\hat{\beta_0}$ is individually significant. The 95\% confidence interval for the LRP is about 5.484 to 7.004.
% \subsubsection{FD Feasible GLS Estimatior}
% \label{sec:feas-gls-estim}
% Since there is evidence of serial correlation in the FD results, we also examined generalized least
% squares (FEGLS) estimator as an alternative way to obtain a model with a serially uncorrelated error. The FEGLS model is also robust against any type of intragroup heteroskedasticity
% and serial correlation. Strict exogeneity must hold for FGLS to
% produce consistent estimators.  We modify the Prais-Winsten approach
% to be applicable for panel data.

% First difference FGLS estimators are based on a two-step estimation process: first an OLS model is estimated, then its residuals are used to estimate an error covariance matrix more general than the random effects one used in a feasible GLS analysis. \citep{Im1999}. The resulting lag distribution is in Figure \ref{jobgls}, and full results are presented in Table \ref{table:jobglsfull}. We found the GLS estimation results to be in line with the FD ones. The current and lag $wcap$s are still not significant, while the long run multiplier of wells $LRP_{well} = 121.69$. 

% \begin{figure}[h]
%   \centering \includegraphics[width=0.7\textwidth]{ch3/jobgls.pdf}
% \caption{FEGLS Impact multipliers in 6 periods}
% \label{jobgls}  
% \end{figure}
